home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / WINZOOM.CPP < prev   
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.3 KB  |  65 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // FusionWindow
  8. //
  9.  
  10. #include "fliwin.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  17. //
  18. // ZoomWindow()
  19. //
  20. // Zooms or unzooms the current window
  21. //
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23.  
  24. void FusionWindow::ZoomWindow()
  25. {
  26.   if (!NumberOfWindows)
  27.     return;
  28.  
  29.   RemoveAllMenus();
  30.  
  31.   WindowElement &Window=*Windows[0];
  32.  
  33.   if (!Window.ZoomIcon)
  34.     return;
  35.  
  36.   if (!Window.WindowZoomed)
  37.   {
  38.     Window.OldX=Window.X;
  39.     Window.OldY=Window.Y;
  40.     Window.OldWidth=Window.Width;
  41.     Window.OldHeight=Window.Height;
  42.     Window.WindowZoomed=1;
  43.     Window.X=0;
  44.     Window.Y=1;
  45.     Window.Width=Blaze.WhatWidth();
  46.     Window.Height=Blaze.WhatHeight()-2;
  47.     Window.ShowWindow();
  48.     Window.ShowInterior();
  49.     Window.EventHandler(ZoomEvent);
  50.     return;
  51.   }
  52.   else
  53.   {
  54.     Window.X=Window.OldX;
  55.     Window.Y=Window.OldY;
  56.     Window.Width=Window.OldWidth;
  57.     Window.Height=Window.OldHeight;
  58.     Window.WindowZoomed=0;
  59.     RefreshWindows();
  60.     Window.EventHandler(ZoomEvent);
  61.     return;
  62.   }
  63. }
  64.  
  65.